package E2016;

import java.util.Iterator;
import java.util.Set;
import java.util.TreeSet;

public class Exam3 {
    public static void main(String[] args) {
        Set set = new TreeSet();
        for (int i = 0; i >= 0; i++) {
            if (i % 2 == 1 && i % 3 == 2 && i % 5 == 4 && i % 6 == 5 && i % 7 == 0) {
                set.add(i);
                if (set.size() > 10) {
                    break;
                }
            }
        }
        Iterator it = set.iterator();
        while (it.hasNext()) {
            Object o = it.next();
            System.out.println("这个台阶最小有：" + o + "级台阶。");
            break;
        }
    }
}
